﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.comcast.logging.consoles {
    import flash.utils.*;
    import net.comcast.logging.*;
    import flash.external.*;

    public class FirebugConsole implements IConsole {

        public function log(_arg1, _arg2:Number, _arg3:String):void{
            var jsLogFunc:String;
            var source = _arg1;
            var level = _arg2;
            var msg = _arg3;
            msg = ((((("[" + Level.getLevelString(level)) + "][") + getQualifiedClassName(source)) + "]") + msg);
            switch (level){
                case Level.FATAL:
                    jsLogFunc = "console.error";
                    break;
                case Level.WARN:
                    jsLogFunc = "console.warn";
                    break;
                case Level.INFO:
                    jsLogFunc = "console.info";
                    break;
                default:
                    jsLogFunc = "console.log";
            };
            if (ExternalInterface.available){
                try {
                    ExternalInterface.call(jsLogFunc, msg);
                } catch(e:Error) {
                };
            };
        }

    }
}//package net.comcast.logging.consoles 
